List of cost center settings
Cost centers let you get information about business rides from employees. You need to set up all parameters when creating a cost center.
Request syntax
GET https://business.taxi.yandex.ru/api/1.0/client/{client ID}/cost_centers
🔴 We recommend using API 2.0. API 1.0 support will be discontinued in the future.
Request headers:
Authorization
OAuth access token. The steps to get a token are described in Getting started.
Request example
GET https://business.taxi.yandex.ru/api/1.0/client/a2...d09/cost_centers
Authorization: <OAuth token>
Response example
{
"items": [
{
"id": "1234567890abcdef1234567890abcdef",
"name": "Main cost center",
"default": true,
"field_settings": [
{
"id": "0123456789abcdef0123456789abcde0",
"hidden": false,
"title": "Cost center",
"required": true,
"services": ["taxi"],
"format": "select",
"values": ["business trip", "to HQ"]
},
{
"id": "0123456789abcdef0123456789abcde1",
"hidden": false,
"title": "Ride purpose",
"services": ["taxi"],
"required": true,
"format": "mixed",
"values": ["purpose 1", "purpose 2", "special purpose"]
},
{
"id": "0123456789abcdef0123456789abcde2",
"hidden": true,
"title": "Case number",
"services": ["taxi"],
"required": true,
"format": "text",
"values": []
}
]
}
]
}
Response field description
| Field | Description | Format |
|---|---|---|
items |
List of cost center settings. | Array |
id |
ID of the cost center settings. | String |
client_id |
Client ID. | String |
name |
Name of the cost center settings. | String |
default |
Whether these are the main settings. | Boolean |
field_settings |
List of settings for each cost center field. | Array |
field_settings.[N].id |
Field ID. | String |
field_settings.[N].title |
Field name. | String |
field_settings.[N].required |
Whether this field must be filled out when the order is placed. | Boolean |
field_settings.[N].hidden |
Don't show or use this field when the order is placed. Optional field. | Boolean |
field_settings.[N].services |
IDs of the services in which this field can be used when the order is placed. Currently only taxi is supported. |
Array |
field_settings.[N].format |
Format for specifying the cost center for the employee. Possible values: - select: The employee selects the cost center from the list.- text: The employee specifies the cost center on their own in the text field.- mixed: The employee can both select the cost center from the list and specify it in the text field. |
Object |
field_settings.[N].values |
List of cost centers available to the employee. List format: "cost_center1", "cost_center2", ....Available only when the format value is mixed and select. |
Object |
Response codes
The response to this request may contain the following standard HTTP codes:
200: Request completed successfully.401: The OAuth token is incorrect.403: The client doesn't have sufficient rights to execute this request.
Was the article helpful?
Previous
Next